/*
 * networkUtils.h
 *
 *  Created on: Jun 18, 2013
 *      Author: shaohong
 */

#ifndef NETWORKUTILS_H_
#define NETWORKUTILS_H_

#include <string>
#include "PingStats.h"

using namespace std;

namespace dnm {

// the configuration to run ping command with
struct PingCfg {
	int numOfPkt; // the number of request packets sent
};


class NetworkUtils {
public:
	NetworkUtils();
	virtual ~NetworkUtils();

	// ping the given host according to the given configuration
	static PingStats ping(string hostName, const PingCfg& cfg);

	static bool isEmptyLine(const char * line);

};

} /* namespace dnm */
#endif /* NETWORKUTILS_H_ */
